Class MockLanguage

Summary

Fully Qualified Name: CodeIgniter\Test\Mock\MockLanguage
Extends: Language

Description

Methods

Name Description Defined By
__construct() Language
disableIntlSupport() Arbitrarily turnoff internationalization support for testing MockLanguage
getLine() Parses the language string for a file, loads the file, if necessary, getting the line. Language
getLocale() Language
setData() Sets the data that should be returned by the 'requireFile()' method to allow easy overrides during testing. MockLanguage
setLocale() Sets the current locale to use when performing string lookups. Language

Method Details

__construct()

Parameter Name Type Description
$locale

Returns: void

disableIntlSupport()

Arbitrarily turnoff internationalization support for testing

Returns:

getLine()

Parses the language string for a file, loads the file, if necessary, getting the line.

Parameter Name Type Description
$line string Line.
$args array Arguments.

Returns: string|string[] Returns line.

getLocale()

Returns: string

setData()

Sets the data that should be returned by the 'requireFile()' method to allow easy overrides during testing.

Parameter Name Type Description
$data array
$file string
$locale string|null

Returns: $this

setLocale()

Sets the current locale to use when performing string lookups.

Parameter Name Type Description
$locale string

Returns: $this

Top